package com.zp.common.base.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zp.common.base.entity.RoleAuth;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleAuthRepository extends BaseMapper<RoleAuth> {
    @Select("select * from t_role_auth where role_id=#{roleId} and status=#{status}")
    List<RoleAuth> findByRoleIdAndStatus(@Param("roleId") Long roleId, @Param("status")Integer status);

    @Select("select * from t_role_auth where auth_id=#{authId} and status=#{status}")
    List<RoleAuth> findByAuthIdAndStatus(@Param("authId") Long authId,@Param("status")Integer status);
}
